package jp.sourceforge.akjrcp.psp;

public class PSPMovieSetting {
//	4:3
	public static final String SIZE_160x112="160x112";
	public static final String SIZE_320x240="320x240";
	public static final String SIZE_368x272="368x272";

//	16:9
	public static final String SIZE_192x112="192x112";
	public static final String SIZE_368x208="368x208";
	public static final String SIZE_480x272="480x272";	//H264 only 
	public static final String SIZE_720x480="720x480";	//H264 only

	public static final String SIZE_352x480="352x480";	//H264 only
	
	public static final String SIZE_480x270="480x270";	//H264 only 
	public static final String SIZE_360x270="360x270";	//H264 only 

	public static final int AUDIO_CHANNEL_STEREO=2;
	public static final int AUDIO_CHANNEL_MONORAL=1;
	
	public static final double VIDEO_RATE_29_97=29.97;
	public static final double VIDEO_RATE_14_985=14.985;




	public static final String IMAGE_SIZE_160x120="160x120";	//thumb
	
	public static final int BITRATE_48=48;	
	public static final int BITRATE_64=64;	
	public static final int BITRATE_96=96;
	public static final int BITRATE_128=128;	

	public static final int AUDIO_RATE_24000=24000;
	public static final int AUDIO_RATE_48000=48000;
	
	public static final int BITRATE_384=384;	//level 1.2
	public static final int BITRATE_448=448;	//
	public static final int BITRATE_512=512;	//
	public static final int BITRATE_640=640;	//
	public static final int BITRATE_768=768;	//
	public static final int BITRATE_896=896;	//
	public static final int BITRATE_1024=1024;	//
	public static final int BITRATE_1536=1536;	//
	
	public static final int BITRATE_MAX_LEVEL21_4000=4000;	//see http://en.wikipedia.org/wiki/H264
	public static final int BITRATE_MAX_LEVEL30_10000=10000;
	
	public static final String VIDEO_ASPECT_4x3="4:3";
	public static final String VIDEO_ASPECT_16x9="16:9";
	
public static final int XVID=0;
public static final int H264=1;
private int codec;
private String size;	//size must be 16x
private int videoBitrate;	//maybe xvid max is 768?
private int audioBitrate;
private int audioChannel;
private int audioRate;	//k
private double videoRate;

private String aspectRatio;

private boolean highQuality;

private String comment="";
public String getAspectRatio() {
	return aspectRatio;
}

public void setAspectRatio(String aspectRatio) {
	this.aspectRatio = aspectRatio;
}

public int getAudioBitrate() {
	return audioBitrate;
}

public void setAudioBitrate(int audioBitrate) {
	this.audioBitrate = audioBitrate;
}

public int getAudioChannel() {
	return audioChannel;
}

public void setAudioChannel(int audioChannel) {
	this.audioChannel = audioChannel;
}

public int getAudioRate() {
	return audioRate;
}

public void setAudioRate(int audioRate) {
	this.audioRate = audioRate;
}

public int getVideoCodec() {
	return codec;
}

public void setVideoCodec(int codec) {
	this.codec = codec;
}

public boolean isHighQuality() {
	return highQuality;
}

public void setHighQuality(boolean highQuality) {
	this.highQuality = highQuality;
}

public String getVideoSize() {
	return size;
}

public void setVideoSize(String size) {
	this.size = size;
}

public int getVideoBitrate() {
	return videoBitrate;
}

public void setVideoBitrate(int videoBitrate) {
	this.videoBitrate = videoBitrate;
}

public double getVideoRate() {
	return videoRate;
}

public void setVideoRate(double videoRate) {
	this.videoRate = videoRate;
}

public int getWidth(){
if(size==null){
	return 0;
}
if(size.indexOf("x")!=-1){
	String wh[]=size.split("x");
	return Integer.parseInt(wh[0]);
}else{
	return 0;
}
}

public int getHeight(){
	if(size==null){
		return 0;
	}
	if(size.indexOf("x")!=-1){
		String wh[]=size.split("x");
		return Integer.parseInt(wh[1]);
	}else{
		return 0;
	}
	
}

public String getComment() {
	return comment;
}

public void setComment(String comment) {
	this.comment = comment;
}

}
